package com.ibr.ticketmanagement.app.data;

import android.content.ContentValues;

import com.ibr.ticketmanagement.app.util.DatabaseHandler;

/**
 * Created by Girishn on 5/28/2014.
 */
public class Location {
    private long _id;
    private String locationId;
    private String location;
    private long version;

    public Location(long _id, String locationId, String location, long version) {
        this._id = _id;
        this.locationId = locationId;
        this.location = location;
        this.version = version;
    }

    public Location(String locationId, String location, long version) {
        this.locationId = locationId;
        this.location = location;
        this.version = version;
    }

    public Location(String locationId, String location) {
        this.locationId = locationId;
        this.location = location;
    }

    public long getVersion() {
        return version;
    }

    public void setVersion(long version) {
        this.version = version;
    }

    public long get_id() {
        return _id;
    }

    public void set_id(long _id) {
        this._id = _id;
    }

    public String getLocationId() {
        return locationId;
    }

    public void setLocationId(String locationId) {
        this.locationId = locationId;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public ContentValues getContentValues() {
        ContentValues values = new ContentValues();
        values.put(DatabaseHandler.KEY_LOCATION_LOC_ID, getLocationId());
        values.put(DatabaseHandler.KEY_LOCATION_NAME, getLocation());
        values.put(DatabaseHandler.KEY_LOCATION_VERSION, getVersion());
        return values;
    }
}
